astring = input("请输入字符串：")
bstring = input("请输入字符串：")
a = {}
b = {}
for x in astring:
    a[x] = a.get(x,0)+1
for x in bstring:
    b[x] = b.get(x,0)+1
print(a)
print(b)
if a == b:
    print("相同")
else:
    print("不相同")